#pragma once
#define _CRT_SECURE_NO_WARNINGS

#include<iostream>
#include<string.h>
#include<assert.h>
using namespace std;

namespace hhz
{
	class string
	{
	public:
		string(const char* st = "");
		~string();

		//============
		const char* c_str() const
		{
			return _str;
		}

		void reserve(size_t n);
		void push_back(char ch);
		void append(const char* str);
		string& operator+=(char ch);
		string& operator+=(const char* str);

		void insert(size_t pos, size_t n, char ch);

	private:
		char * _str;
		int _size;
		int _capacity;

		const  static size_t npos;
	};
}
